#define _CRT_SECURE_NO_WARNINGS 1


#include<iostream>
using namespace std;
const int N = 1e8 + 10;
int brr[N];
int main()
{
	int n;
	cin >> n;
	//int arr[n];
	int arr[1000];
	for (int i = 0;i < n;i++)
		cin >> arr[i];
	for (int i = 1;i < n;i++)
	{
		int tmp = abs(arr[i] - arr[i - 1]);
		brr[tmp] = 1;
	}
	int flag = 1;
	for (int i = 1;i < n;i++)
	{
		if (brr[i] == 0)
			flag = 0;
	}
	if (flag)
		cout << "Jolly";
	else
		cout << "Not jolly";
	return 0;
}